package com.gcd.service.impl;

import com.gcd.mapper.MemberMapper;
import com.gcd.model.Member;
import com.gcd.service.MemberService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

@Service
public class MemberServiceImpl implements MemberService {
    private MemberMapper memberMapper;

    @Autowired
    public void setMemberMapper(MemberMapper memberMapper) {
        this.memberMapper = memberMapper;
    }

    @Override
    public Member findById(Integer id) {
        return memberMapper.selectById( id);
    }

    @Override
    public boolean registerVip(Integer memberId) {
        return memberMapper.registerVip(memberId)==1;
    }
}
